import { Component, Input, Output, EventEmitter, OnInit, OnChanges } from '@angular/core';
import { NzNotificationService } from 'ng-zorro-antd';
import { Router } from '@angular/router';
import { el } from "@angular/platform-browser/testing/src/browser_util";
import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
import { Config } from '../service/config';
@Component({
    selector: 'enlarge-pic',
    templateUrl: 'enlarge-pic.html',
    styleUrls: ['enlarge-pic.scss']
})
export class EnlargePic implements OnInit, OnChanges {
    validateForm: FormGroup;
    isSpinning: boolean=false;
    pics: any = [];
    config = Config;
    auto = true;
    btnmsg = '停止自动播放';
    @Input() inValue: any = [];
    @Output("outPut") outPut = new EventEmitter();
    //系统类型

    constructor(
        private fb: FormBuilder,
        private _notification: NzNotificationService
    ) {
    }

    ngOnInit() {

    }

    ngOnChanges() {
        this.pics = [];
        if (this.inValue) {
            this.pics = this.inValue;
        }
    }

    changeAuto(){
        if(this.auto){
            this.auto = false;
            this.btnmsg = "开始自动播放";
        }else{
            this.auto = true;
            this.btnmsg = "停止自动播放";
        }
    }

}